#! /bin/bash

cat > a.txt << "EOF"
this is a text line.
second

third

fourth

last
EOF

echo "grep '\w' a.txt"
grep '\w' a.txt
echo ""
echo "grep -v '^[[:space:]]*$' a.txt"
grep -v '^[[:space:]]*$' a.txt
echo ""
echo "grep '^[[:space:]]*$' a.txt"
grep '^[[:space:]]*$' a.txt
echo ""


rm a.txt -f
